<#import "../macro/components.ftl" as components/>
<#include "../macro/layout_default.ftl"/>

<@head>
<#--<link rel="stylesheet" href="/misc/app/css/product_list.css"/>-->
<link rel="stylesheet" href="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.css"/>

</@head>
<@body>
<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/moment.min.js"></script>
<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.js"></script>
<script src="/misc/app/js/cust_scan_list.js"></script>
</@body>

<@layout_default>
<div class="box">
    <div class="box-header with-border">
    <#--<span class="pull-right text-muted">共 ${custScanList.resultTotal} 条记录</span>-->
        <form class="form-inline" action="/cust/scanList">
            <div>
                <input type="hidden" name="branchId" value="${branchId!}">
                <div class="input-group">
                    <div class="input-group-addon">产品名称/编码</div>
                    <input type="text" class="form-control" style="width: 260px" name="product" value="${product!}"/>
                </div>

                <div class="input-group">
                    <div class="input-group-addon">箱码</div>
                    <input type="text" class="form-control" style="width: 260px" name="boxCode" value="${boxCode!}"/>
                </div>
            </div>
            <div style="padding-top:5px;">
                <input type="hidden" id="timeS_hidden" value="${scanTimeS!}" />
                <input type="hidden" id="timeE_hidden" value="${scanTimeE!}" />
                <div class="input-group">
                    <div class="input-group-addon">扫码时间</div>
                    <input type="text" class="form-control" id="time_start" name="scanTimeS" size="18">
                </div>
                <div class="input-group"> 至 </div>
                <div class="input-group">
                    <input type="text" class="form-control" id="time_end" name="scanTimeE" size="18">
                </div>



                <button type="submit" class="btn btn-warning"><i class="fa fa-search"></i> 查询</button>
            </div>
        </form>
    </div>

    <div class="box-body">
        <table class="table table-striped table-hover">
            <tr>
                <th>ID</th>
                <th>产品名称</th>
                <th>产品编码</th>
                <th>规格</th>
                <th>箱码</th>
                <th>扫码时间</th>
            </tr>
            <#if (custScanList.result?size > 0)>
                <#list custScanList .result as item>
                    <tr>
                        <td>${item.id!}</td>
                        <td>${item.name!}</td>
                        <td>${item.number!}</td>
                        <td>${item.pcount!}</td>
                        <td>${item.boxId!}</td>
                        <td>${item.scanTime?number_to_datetime}</td>
                    </tr>
                </#list>
            <#else>
                <tr>
                    <td class="text-center text-muted" colspan="6"><i class="fa fa-info-circle"></i> 没有记录</td>
                </tr>
            </#if>
        </table>
    </div>
    <!-- /.box-body -->
    <div class="box-footer text-center">
        <@components.pagination "/cust/scanList?product=${product!}&boxCode=${boxCode!}&scanTimeS=${scanTimeS!}&scanTimeE=${scanTimeE!}&page=$page",custScanList.page,custScanList.pageTotal/>
    </div>
</div>

</@layout_default>